package com.huawang.mdesign.model.service.util.reqif;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * This class constitutes the root element of the Exchange Document.
 *
 * @author xdl
 * @since 2023-04-04
 */
@Getter
@Setter
@XStreamAlias(ReqIFConstants.REQ_IF)
public class ReqIF {

    @XStreamAlias(ReqIFConstants.XMLNS)
    @XStreamAsAttribute
    private String xmlns = ReqIFConstants.XMLNS_VALUE;

    @XStreamAlias(ReqIFConstants.XMLNS_NS2)
    @XStreamAsAttribute
    private String xmlnsNs2 = ReqIFConstants.XMLNS_NS2_VALUE;

    /**
     * This composition links the mandatory Exchange Document header, which contains metadata relevant for this
     * exchange.
     */
    @XStreamAlias(ReqIFConstants.HEADER)
    private List<ReqIFHeader> theHeader = new ArrayList<>();

    /**
     * This composition links the mandatory Exchange Document content.
     */
    @XStreamAlias(ReqIFConstants.CORE_CONTENT)
    private List<ReqIFContent> coreContent = new ArrayList<>();

    /**
     * This composition links optional Exchange Document content based on tool extensions, if such extensions and
     * content are present.
     */
    @XStreamAlias(ReqIFConstants.TOOL_EXTENSIONS)
    private List<ReqIFToolExtension> toolExtensions = new ArrayList<>();
}
